package com.cdwh.joylife.ui.activity;

import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.cdwh.joylife.R;
import com.cdwh.joylife.ui.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SettingActivity extends BaseActivity {

    @BindView(R.id.tvCache)
    TextView tvCache;
    @BindView(R.id.btnClearCache)
    RelativeLayout btnClearCache;
    @BindView(R.id.btnFaceback)
    RelativeLayout btnFaceback;
    @BindView(R.id.tvVersionName)
    TextView tvVersionName;
    @BindView(R.id.btnAbout)
    RelativeLayout btnAbout;
    @BindView(R.id.btnShare)
    RelativeLayout btnShare;
    @BindView(R.id.btnLogout)
    Button btnLogout;


    @Override
    protected void setContentView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_setting);
        ButterKnife.bind(this);
    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.btnClearCache, R.id.btnFaceback, R.id.btnAbout, R.id.btnShare, R.id.btnLogout})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btnClearCache:
                break;
            case R.id.btnFaceback:
                break;
            case R.id.btnAbout:
                break;
            case R.id.btnShare:
                break;
            case R.id.btnLogout:
                new AlertDialog.Builder(this)
                        .setTitle("退出")
                        .setMessage("是否退出当前账号？")
                        .setPositiveButton("确定", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {

                            }
                        })
                        .setNegativeButton("取消", null)
                        .show();
                break;
        }
    }

    @Override
    public void onReceive(Object data) {

    }

    @Override
    public void onReceive(Object data, int type) {

    }
}
